﻿@model Sidvall.WorkItemManager.Web.Host.Models.WorkItemModel
@{
	if (Model.WorkItem.IsNew)
	{
		ViewBag.Title = "New work item";
	}
	else
	{
		ViewBag.Title = Model.WorkItem.Name;
	}
}

<h2>@ViewBag.Title</h2>
<hr />

@using (Html.BeginRouteForm("SaveNewQuestion", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
{
	@Html.AntiForgeryToken()
	@Html.ValidationSummary("", new { @class = "text-danger" })
	<div class="form-group">
		@Html.LabelFor(m => m.WorkItem.Name, new { @class = "col-md-2 control-label" })
		<div class="col-md-10">
			@Html.TextBoxFor(m => m.WorkItem.Name, new { @class = "form-control" })
		</div>
	</div>
	<div class="form-group">
		@Html.LabelFor(m => m.WorkItem.LastResultMessage, new { @class = "col-md-2 control-label" })
		<div class="col-md-10">
			@Html.TextAreaFor(m => m.WorkItem.LastResultMessage, 4, 1, new { @class = "form-control" })
		</div>
	</div>
}
